package com.taoge.exception;

import java.io.Serial;

/**
 * 切点表达式异常
 * @author Mr.Tao
 */
public final class RateLimitConfigException extends RuntimeException
{
    @Serial
    private static final long serialVersionUID = 2L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 空构造方法，避免反序列化问题
     */
    public RateLimitConfigException() {
    }

    public RateLimitConfigException(String message)
    {
        this.message = message;
    }

    public RateLimitConfigException(String message, Integer code)
    {
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public Integer getCode()
    {
        return code;
    }
}